using System;
using System.Collections.Generic;
using System.Text;
using RideMe.Core.SortableCollection;

namespace RideMe.Core.Parser
{
    /// <summary>
    /// Represents a Ruby class or module.
    /// </summary>
    public class TopLevelEntity : IRubyEntity
    {

        private string _name;

        public string Name
        {
            get { return _name; }
            set { _name = value;}
        }

        private int _line;

        public int Line
        {
            get { return _line; }
            set { _line = value; }
        }

        private int _column;

        public int Column
        {
            get { return _column; }
            set { _column = value;}
        }

        private int _lineLength;

        public int LineLength
        {
            get { return _lineLength; }
            set { _lineLength = value; }
        }


        private SortableCollection<TopLevelEntity> _subEntities = new SortableCollection<TopLevelEntity>();

        public SortableCollection<TopLevelEntity> SubEntities
        {
            get { return _subEntities; }
            set { _subEntities = value; }
        }

        private EndStatement _end;

        public EndStatement End
        {
            get { return _end; }
            set { _end = value; }
        }
	
        private SortableCollection<Method> _methods = new SortableCollection<Method>();

        public SortableCollection<Method> Methods
        {
            get { return _methods; }
            set { _methods = value; }
        }

        private SortableCollection<EndStatement> _endStatements = new SortableCollection<EndStatement>();

        public SortableCollection<EndStatement> EndStatements
        {
            get { return _endStatements; }
            set { _endStatements = value; }
        }

        public override string ToString()
        {
            return _name;
        }
    }
}
